import {
	post,
	get,
	postForm,
	postFile,
	put,
	delet,
	postHeaderJson,
} from "./request";
import {
	baseApi,
} from "./env";

//实时数据查询
const queryTempquery = data => post(baseApi + '/api/address/tempquery', data);

//发电曲线 42-44
const queryCharts = data => post(baseApi + '/api/history/query', data);

//故障告警统计
const logStatistics = data => get(baseApi + '/api/logStatistics/get', data);

//加氢日志查询
const queryGeneralLog = data => post(baseApi + '/log/general', data);

//实时告警柱状图查询
const queryWarningStats = data => get(baseApi + '/log/warning/statistics/today', data);

//实时告警列表查询
const queryWarningLog = data => get(baseApi + '/log/warning/get', data);

//历史告警列表查询
const queryLog = data => post(baseApi + '/log/search', data);

//告警故障数量统计查询
const queryLogStatistics = data => get(baseApi + '/api/logStatistics/get', data);

//告警故障数量统计查询
const queryLogStatisWeek = data => get(baseApi + '/log/warning/statistics/weekcompare', data);

//实时日志查询
const queryLogInfo = data => get(baseApi + '/log/info/get', data);

//运行曲线查询
const queryCurveList = data => post(baseApi + '/api/curveList/search', data);


//通道列表查询
const queryChannelList = data => get(baseApi + '/api/configuration/channel/get', data);

//通道列表新增
const addChannelList = data => post(baseApi + '/api/configuration/channel/insert', data);

//通道修改
const updateChannel = data => post(baseApi + '/api/configuration/channel/update', data);

//通道删除
const deleteChannel = data => post(baseApi + '/api/configuration/channel/batchDelete', data);

//通道批量上传
const batchInsertChannel = data => post(baseApi + '/api/configuration/channel/batchInsert', data);



//规约列表查询
const queryProtocolList = data => get(baseApi + '/api/configuration/protocol/get', data);

//规约列表新增
const addProtocolList = data => post(baseApi + '/api/configuration/protocol/insert', data);

//规约列表删除
const deleteProtocol = data => post(baseApi + '/api/configuration/protocol/batchDelete', data);

//规约列表修改
const updateProtocol = data => post(baseApi + '/api/configuration/protocol/update', data);

//规约批量上传
const batchInsertProtocol = data => post(baseApi + '/api/configuration/protocol/batchInsert', data);


//遥测列表查询
const queryYCList = data => get(baseApi + '/api/configuration/iec104_yc/get', data);

//遥测列表删除
const deleteYCList = data => post(baseApi + '/api/configuration/iec104_yc/batchDelete', data);

//遥测列表新增
const addYCList = data => post(baseApi + '/api/configuration/iec104_yc/insert', data);

//遥测列表修改
const updateYCList = data => post(baseApi + '/api/configuration/iec104_yc/update', data);

//遥信列表批量上传
const batchInsertYCList = data => post(baseApi + '/api/configuration/iec104_yc/batchInsert', data);



//遥信列表查询
const queryYXList = data => get(baseApi + '/api/configuration/iec104_yx/get', data);

//遥信列表删除
const deleteYXList = data => post(baseApi + '/api/configuration/iec104_yx/batchDelete', data);

//遥信列表新增
const addYXList = data => post(baseApi + '/api/configuration/iec104_yx/insert', data);

//遥信列表修改
const updateYXList = data => post(baseApi + '/api/configuration/iec104_yx/update', data);

//遥信列表批量上传
const batchInsertYXList = data => post(baseApi + '/api/configuration/iec104_yx/batchInsert', data);



//用户列表查询
const queryUserList = data => get(baseApi + '/api/user/list', data);


//控制命令前需验证身份
const verifyUserInfo = data => post(baseApi + '/api/login/direct', data);




export default {
	queryTempquery,
	queryCharts,
	logStatistics,
	queryGeneralLog,
	queryWarningStats,
	queryWarningLog,
	queryLog,
	queryLogStatistics,
	queryLogStatisWeek,
	queryLogInfo,
	queryCurveList,
	queryChannelList,
	addChannelList,
	updateChannel,
	deleteChannel,
	batchInsertChannel,
	queryProtocolList,
	addProtocolList,
	deleteProtocol,
	updateProtocol,
	batchInsertProtocol,
	queryYCList,
	deleteYCList,
	addYCList,
	updateYCList,
	batchInsertYCList,
	queryYXList,
	deleteYXList,
	addYXList,
	updateYXList,
	batchInsertYXList,
	queryUserList,

	verifyUserInfo,
}
